package com.hckj.jianzhijia.popupwindows;

import android.content.Context;
import android.view.View;

/**
 * Created by 赵奇隆 on 2015-11-09.
 * 增加功能只需要增加data数组内容和接口的方法
 */
public class JobPublishedPopWin extends ListPopupWindow {

    public static final String[] data = {"结束招募","推送","查看报名"};
    private PopWinInterface popWinInterface;
    private int listPosition;

    public JobPublishedPopWin(Context context,PopWinInterface popWinInterface ,View parentView,int listPosition) {
        super(context, parentView, null, data);
        this.popWinInterface = popWinInterface;
        this.listPosition = listPosition;
    }

    @Override
    public void getListItem(int position, String itemName) {
        if(position==0){
            popWinInterface.exitPublish(listPosition);
        }else if(position==1){
            popWinInterface.pushJob(listPosition);
        }else if(position == 2){
            popWinInterface.showApplyPeople(listPosition);
        }else{
            popWinInterface.modifyJob(listPosition);
        }
    }

    public interface PopWinInterface {
        public void exitPublish(int position);
        public void pushJob(int position);
        public void showApplyPeople(int position);
        public void modifyJob(int position);
    }





}
